/**
 * countProvider module
 */

  var countProvider = (function (){
      var count = {
          text: 0,
          graph: 0,
          picture: 0,
          video: 0,
          audio: 0,
          three: 0,
          call: 0,
          geo: 0,
          link: 0,
          album: 0,
          extend: 0,
          app: 0,
          fixedBtn:0,
          form: 0,
          nearby: 0
      };

      return {
          addCount: function (type){
              if (typeof count[type] !== "undefined"){
                  count[type]++;
              }
          },
          subCount: function (type){
              if (typeof count[type] !== "undefined"){
                  count[type]--;
              }
          },
          setCount: function (type, num){
              if (typeof count[type] !== "undefined"){
                  count[type] = num;
              }
          },
          getCount: function (type){
              return count[type] || 0;
          }
      };
  })();

  module.exports = countProvider;
